<?php
class Anderles_Form_Captcha_CaptchaDigits extends Zend_Captcha_Image
{
    static $NNN = array("1", "2","3","4","5","6","7","8","9", "0");

    protected function _generateWord()
    {
        $word       = '';
        $wordLen    = $this->getWordLen();
        $vowels     = $this->_useNumbers ? self::$VN : self::$V;
        $consonants = $this->_useNumbers ? self::$CN : self::$C;
        $numbers = self::$NNN;

        for ($i=0; $i < $wordLen; $i++) {
            // generate word with mix of vowels and consonants
            $word     .= $numbers[array_rand($numbers)];
        }
        if (strlen($word) > $wordLen) {
            $word = substr($word, 0, $wordLen);
        }
        return $word;
    }
}